package cn.anecansaitin.not_enough_harness.common;

import cn.anecansaitin.not_enough_harness.NotEnoughHarness;
import cn.anecansaitin.not_enough_harness.common.payload.UsingHarnessCapability;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent;

@EventBusSubscriber(modid = NotEnoughHarness.MOD_ID)
public class ModPayload {
    public static final String PAYLOAD_VERSION = "1.0.0";
    @SubscribeEvent
    public static void registerPayload(RegisterPayloadHandlersEvent event) {
        event.registrar(PAYLOAD_VERSION)
                .playToServer(UsingHarnessCapability.TYPE, UsingHarnessCapability.CODEC, UsingHarnessCapability::handler);
    }
}
